package com.battle.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import javax.persistence.Table;

/**
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2024/8/22 14:33
 */
@Data
@TableName(value = "ROLE")
@Entity(name = "ROLE")
@AccEntity(value = "角色", type = EntityType.SERVICE_ENTITY)
public class Role extends DomainBaseEntity<Role> {

    /**
     * 角色名称
     */
    @Column(length = 50,
            nullable = false)
    private String name;

    /**
     * 备注
     */
    @Column(length = 255)
    private String remark;


    /**
     * 是否为系统级
     */
    @Column()
    private Boolean isSystem;

    /**
     * 是否为管理员角色
     */
    @Column()
    private Boolean isAdmin;

    /**
     * 角色资源code列表
     */
    @Column()
    private String resourceCodeList;
}
